home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4357 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: news.spies.com!usenet
  2. From: Erik Max Francis <max@alcyone.com>
  3. Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
  4. Subject: Re: float != float and floats as return types
  5. Date: Mon, 29 Jan 1996 14:43:40 -0800
  6. Organization: &tSftDotIotE
  7. Message-ID: <310D4D9C.7DAB2E1B@alcyone.com>
  8. References: <4ej9lb$mpc@fu-berlin.de>
  9. NNTP-Posting-Host: newton.alcyone.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6a (X11; I; Linux 1.2.8 i486)
  14.  
  15. Axel Thimm wrote:
  16.  
  17. > At first I thought all numbers should be zeros. The middle column might
  18. > not be zero, if the compiler calculates in higher precision than what
  19. > the variables are, so an intermediate storage (b) might loose some
  20. > digits, but I cannot understand what happens with c! Both times a
  21. > function is called, that _is_not_ inlined, so in both cases the same
  22. > loss of digits should be observed.
  23. > Any ideas?
  24.  
  25. I don't understand what you find surprising.  Both the second and third column
  26. have the same computation, except that in one of the x^2 function is inlined
  27. and in the other it is called through a function.  In either case, you get
  28. exactly the same value.  What is the objection?
  29. -- 
  30. Erik Max Francis, &tSftDotIotE. && max@alcyone.darkside.com || max@alcyone.com
  31. San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
  32. H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
  33. Omnia quia sunt, lumina sunt. && GIGO Omega Psi && http://www.alcyone.com/max/
  34. "Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_
  35.